#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :fetch_url_by_regex_41.py
# @Time      :2020/6/23 17:01
# @Author    :Administrator
import re

string = 'Runoob 的网页地址为：https://www.runoob.com，Google 的网页地址为：https://www.google.com'


def fetch_url(str, reg):
    return re.findall(reg, str)


print(fetch_url(string, r'https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+'))
